#include<iostream>
using namespace std;
class Base1
{
	private:
		int Base1data;
	public:
		Base1(int data)
		{
			Base1data=data;
			cout<<"base1"<<endl;
		}
};
class Base2
{
	private:
		int Base2data;
	public:
		Base2(int data)
		{
			Base2data=data;
			cout<<"base2"<<endl;
		}
};
class Level1:virtual public Base1,virtual public Base2
{
	private:
		int Level1data;
	public:
		Level1(int data):Base1(data),Base2(data)
		{
			Level1data=data;
			cout<<"level1"<<endl;
		}
};
class Level2:virtual public Base1,virtual public Base2
{
	private:
		int Level2data;
	public:
		Level2(int data):Base1(data),Base2(data)
		{
			Level2data=data;
			cout<<"level2"<<endl;
		}
};
class Leaf:public Level2,public Level1
{
	private:
		int Leafdata;
	public:
		Leaf(int data):Base1(data),Base2(data),Level1(data),Level2(data)
		{
			Leafdata=data;
			cout<<"Leaf"<<endl;
		}
};
int main()
{
	Leaf a(9);
	return 0;
}
